<%@ page import="java.util.HashMap,common.CommonUtil,java.util.*,common.*" contentType="text/html; charset=utf-8" %>
<%
UserSession userSession = (UserSession)session.getAttribute("user"); 

String login_id = null;
String user_id = null;
String admin_level = null;
String login_name = null;
String admin_logo = "";
String admin_logo_str = "";

if(userSession!=null){
login_id = userSession.getLogin_id();
user_id = userSession.getUser_id();
admin_level = userSession.getAdmin_level();
login_name = userSession.getUser_name();
admin_logo = CommonUtil.nvl(userSession.getLogo());
}

if(admin_logo.equals("")){
	admin_logo_str = "/img/logo_top01.gif";
}else{
	admin_logo_str = "/speaking.pb?cmd=download2&file_id="+admin_logo+"&file_name="+admin_logo+"&file_folder=datas";
}

%>

<script>


function go_logout(){
	var frm = document.topform;	
	frm.cmd.value='logout';
	frm.action = '/speaking.pb';
	frm.target= '_self';              
	frm.submit();	
}

function go_main(){
	var frm = document.topform;	
	frm.cmd.value='main';
	frm.action = '/speaking.pb';
	frm.target= '_self';              
	frm.submit();	
}

function go_setup(){
	var frm = document.topform;	
	frm.cmd.value='admin_setup';
	frm.action = '/speaking.pb';
	frm.target= '_self';              
	frm.submit();	
}
</script>
<form name="topform"  method="post" action = "/speaking.pb" >
<input type="hidden" name="cmd" value="">
<input type="hidden" name="admin_id" value="<%=user_id %>">
</form>
	  <div id="header">
	  <%if(userSession!=null){ %>
        <p><a href="#" onclick="go_main()"><img src="<%=admin_logo_str %>" height="49" alt="로고" /></a></p>    
      <%}else{ %>
      	<p><img src="/img/logo_top01.gif"  height="49" alt="로고" /></p>
      	<p></p> 
      <%} %>    
      </div>
 <%if(userSession==null){ %>
       <div id="memberInfo">
        <ul>
          <li><font color="#ffffff"><b>Notice</b>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;정보보안을 위해 비밀번호를 주기적으로 변경하시기 바랍니다.</font>
        </ul>
      </div>
 <%}else{ %>       
      <div id="memberInfo">
		<ul>
          <li><a href="#" class="member"><%=login_name %></a>
          <li>-<a href="#" class="qualify">
          <%if(admin_level.endsWith("1")){ %>
         	 전체관리자
          <%}else if(admin_level.endsWith("2")){ %>
          	부운영자
          <%}else if(admin_level.endsWith("3")){ %>
          	기업관리자
          <%}else if(admin_level.endsWith("4")){ %>
          	Rater
          <%} %>
          </a></li>
          <!-- 
          <li><a href="#" class="btn"><img src="img/btn_login.gif" alt="login" /></a></li>
           -->
          <li><a href="#" onclick="go_logout()" class="btn"><img src="img/btn_logout.gif" alt="logout" /></a></li>
          <li><a href="#" onclick="go_setup()" class="btn"><img src="img/btn_setup.gif" alt="setup" /></a></li>
          <!-- <li><a href="#" class="btn"><img src="img/btn_home.gif" alt="Home" /></a></li> -->
        </ul>
      </div>
 <%} %>       